package xml.pull_xml_api;

import javax.xml.namespace.QName;

public class Attr {
	private final static String XML_NS = "http://www.w3.org/XML/1998/namespace";
	private final QName name;
	private final String value;

	public Attr(QName name, String value) {
		this.name = name;
		this.value = value;
	}
	
	public Attr(String name, String value) {
		this(new QName(name), value);
	}
	
	public static Attr newXmlId(String value) {
		return new Attr(new QName(XML_NS, "id", "xml"), value);
	}
	
	public QName getName() {
		return name;
	}

	public String getValue() {
		return value;
	}
}
